:not(:root):fullscreen {
  .dictation-practice {
    animation: appear 1s forwards ease-in-out;
  }
  .chinese-translation {
    padding: 40px 0;
    animation: larger 1s ease-in-out;
  }
}
@keyframes appear {
  0% {
  }
  100% {
    max-width: 90%;
    margin-top: 40px;
  }
}
@keyframes larger {
  0% {
    padding: 0px 0;
  }
  100% {
    padding: 32px 0;
  }
}
.dictation-practice {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  @media (min-width: 768px) {
    .time-of-next {
      position: relative;
      display: inline-block;
      width: 2rem;
      height: 2rem;
      line-height: 2rem;
      text-align: center;
      color: #334d66;
      font-weight: bold;
      font-family: 'DynaPuff';
    }
    .time-of-next::before {
      position: absolute;
      content: '';
      border-radius: 1.5rem;
      box-sizing: border-box;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      animation: transitionBorder 1s infinite ease-in-out;
      border: 2px dashed #ff6d37;
    }
  }
  @keyframes transitionBorder {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  .dictation-options {
    display: flex;
    gap: 15px;
    margin: 30px auto;
    flex-wrap: wrap;
    width: fit-content;

    .control-button {
      padding: 12px 20px;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
      transition: all 0.3s ease;
      border: none;
      background-color: #f8f9fa;
      color: #333;
      font-weight: 500;

      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        background-color: #e9ecef;
      }

      &.primary {
        background-color: #409eff;
        color: white;

        &:hover {
          background-color: #337ecc;
          box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
        }
      }

      &:disabled {
        opacity: 0.6;
        cursor: not-allowed;

        &:hover {
          transform: none;
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        }
      }
    }

    .control-checkbox {
      display: flex;
      align-items: center;
      margin: auto 0;
      white-space: nowrap;
      color: #606266;
      font-weight: 500;

      :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
        background-color: #409eff;
        border-color: #409eff;
      }

      :deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
        color: #409eff;
      }
    }
  }

  .chinese-translation {
    text-align: center;
    padding: 5px;
    margin: 25px 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-size: 1.3rem;
    color: #212529;
    font-weight: 500;
  }

  .dictation-area {
    margin: 10px 0;

    h3 {
      text-align: center;
      margin-bottom: 10px;
      color: #212529;
      font-size: 1.4rem;
      font-weight: 600;
    }
  }

  .sentence-display {
    padding: 5px;
    min-height: 80px;
    border: 2px dashed #42b983;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.3rem;
  }
  .punctuation-item {
    display: flex;
    flex-direction: column;
    .phonetic-text-null {
      color: transparent;
    }
  }
  .word-item {
    display: inline-block;
    min-width: 60px;
    margin: 0 3px;
    .phonetic-text {
      font-family: 'Tahoma';
      font-size: 0.8rem;
      display: inline-block;
      text-align: center;
      width: 100%;
      color: #ff6d37;
    }
    :deep(.el-input__inner) {
      text-align: center;
      font-size: 1.5rem;
      font-family: 'DynaPuff light';
    }
    :deep(.el-input__wrapper) {
      box-shadow: none;
      border-radius: 0;
      border-bottom: 1px solid #666666;
      transition: box-shadow 0.3s ease;
      text-align: center;
      padding: 0;

      &:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      }
    }

    // 默认状态（无样式）
    :deep(.dictation-input) {
      .el-input__wrapper {
        box-shadow: none;
      }
    }

    // 进行中状态（蓝色边框）
    :deep(.dictation-input.progress) {
      .el-input__wrapper {
        border-bottom: 2px solid #409eff;
      }
    }

    // 错误状态（黄色边框）
    :deep(.dictation-input.error) {
      .el-input__wrapper {
        border-bottom: 2px solid #ef0b0b;
      }
    }

    // 成功状态（绿色边框）
    :deep(.dictation-input.success) {
      .el-input__wrapper {
        border-bottom: 2px solid #67c23a;
        background-image: linear-gradient(to right, #67c23a, #67c23a);
        background-repeat: no-repeat;
        background-position: left bottom;
        border-radius: 4px;
        animation: backColorChanged 0.2s forwards linear;
        .el-input__inner {
          color: yellow !important;
        }
      }
    }
  }
  @keyframes backColorChanged {
    0% {
      background-size: 0 100%;
    }
    100% {
      background-size: 100% 100%;
    }
  }
  .punctuation-item {
    font-weight: bold;
    color: #212529;
  }

  .completion-message {
    margin-top: 25px;
  }

  // 响应式设计
  @media (max-width: 768px) {
    padding: 15px;
    .time-of-next {
      display: none !important;
    }

    .dictation-options {
      gap: 10px;
      margin: 20px 0;

      .control-button {
        padding: 10px 15px;
        font-size: 0.9rem;
      }
    }

    .chinese-translation {
      padding: 15px;
      font-size: 1.1rem;
      margin: 20px 0;
    }

    .dictation-area {
      margin: 5px 0;

      h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
      }
    }

    .sentence-display {
      padding: 15px;
      font-size: 1.1rem;
      min-height: 80px;
      font-size: 2rem;
      gap: 5px;
      .punctuation-item {
        margin-left: 20px;
      }
    }

    .word-item {
      width: 40px;
    }
  }
}

.sentence-selector {
  margin: 20px 0;

  :deep(.el-select) {
    width: 100%;
  }

  :deep(.el-select-dropdown__item) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sentence-option {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;

    .sentence-number {
      flex-shrink: 0;
      margin-right: 8px;
      font-weight: bold;
    }

    .sentence-text {
      flex-grow: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
